<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button on-touch="goback()" class="button return-btn">返回</button>
    <h1 class="title" ng-click="backToTop()">活动详情</h1>
    <button class="button hd-red-btn" ui-sref="my-activity">我的活动</button>
  </ion-header-bar>
  <ion-content class="gray-bg has-footer" has-bouncing="true">
    <div ng-if="meetingDetail">
    <div class="list card activity-top-card">
        <div class="item item-image activity-top-card-img">
            <div class="activity-banner">
              <img ng-click="showBigImage()" ng-src="{{picPath}}middle_{{meetingDetail.acitivityDetail.mm_img_url}}" alt=""/>
            </div>
        </div>
        <div class="item item-avatar activity-top-card-tit">
            <button class="activity-ban-call-btn" type="button" ng-click="phoneCall(meetingDetail.memberInfo.member_contact)"></button>
            <div class="card-user-hd">
                <div class="card-user-hd-pic">
                    <img ng-src="{{picPath}}{{meetingDetail.memberInfo.member_img_url}}" alt=""/>
                    <i class="card-user-hd-icon"><img ng-src="{{picPath}}{{meetingDetail.memberInfo.mr_img_url}}" alt=""/></i>
                </div>
            </div>
            <h2 class="card-user-hd-name">{{meetingDetail.memberInfo.member_name}}</h2>
        </div>
        <div class="item activity-top-card-con">
            <p>{{meetingDetail.acitivityDetail.mm_title}} <em class="activity-ban-note" ng-bind="meetingDetail.acitivityDetail.mm_pay_type">我买单</em></p>
        </div>
    </div>
    <div class="list activity-item">
        <div class="item item-icon-left activity-item-li">
            <i class="activity-time-icon"></i>
            日期：{{meetingDetail.acitivityDetail.mm_time|date:'yyyy-MM-dd HH:mm'}}
        </div>
        <div class="item item-icon-left activity-item-li">
            <i class="activity-people-icon"></i>
            人数：{{meetingDetail.acitivityDetail.mm_attend_num}}<em class="ml10" ng-if="meetingDetail.acitivityDetail.mm_type!='私密约'">{{meetingDetail.acitivityDetail.mm_attend_type}}</em>
        </div>
    </div>

    <div class="list activity-item">
        <div class="item item-icon-left activity-item-li" ng-click='go2shop()'>
            <a class="activity-item-more-icon"></a>
            <a>地点：<span ng-bind-html="meetingDetail.acitivityDetail.mm_address_show"></span></a>
            <i class="activity-addr-icon"></i>
        </div>
    </div>

    <div class="list activity-item">
        <div class="item item-icon-left activity-item-li">
            <i class="activity-tips-icon"></i>
            温馨提示：爽约者需给报名的小伙伴发红包
        </div>
    </div>


    <div class="list activity-item">
        <div class="item activity-item-li" ng-click="showApplyList()">
            <a class="activity-item-more-icon"></a>
            已有<em class="purple mlr5" ng-bind="meetingDetail.personList.length"></em>人报名
        </div>
        <div class="item activity-user-list" ng-if="meetingDetail.personList.length!=0">
            <div class="row row-wrap">
                <div class="col-20" ng-repeat="item in meetingDetail.personList |limitTo:5">
                    <a class="activity-user-li">
                        <em class="activity-user-li-pic">
                            <img ng-src="{{picPath}}{{item.member_img_url}}" alt="" ng-click="go2MemberInfo(item.member_id)"/>
                        </em>
                        <i class="activity-user-li-icon"><img ng-src="{{picPath}}{{item.mr_img_url}}" alt=""/></i>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="tabs activity-tad-nav">
        <a class="tab-item" ng-class="{'active':isShowWine}" ng-click="showWine()">具体酒款</a>
        <a class="tab-item" ng-class="{'active':!isShowWine}" ng-click="showDesc()">描述内容</a>
    </div>
    <div class="activity-item-depict" ng-if="!isShowWine" ng-bind-html="meetingDetail.acitivityDetail.mm_discribe">
      这里是活动的描述内容...
    </div>
    <!--<div class="activity-item-depict" ng-if="isShowWine && meetingDetail.acitivityDetail.mm_wine_detail_type=='1'" ng-bind-html="meetingDetail.acitivityDetail.mm_wine_detail">
      这里是活动的描述内容...&& meetingDetail.acitivityDetail.mm_wine_detail_type=='2'
    </div>-->
    <div class="list" ng-if="isShowWine">
        <ul>
            <li class="item product-item" ng-repeat="item in meetingDetail.acitivityDetail.mm_wine_detail">
                <a ng-href="#/winedetails/{{item.wine_id}}" class="item item-thumbnail-left product-item-list">
                    <div class="product-item-pic"><img ng-src="{{picPath}}{{item.wine_img_url}}" alt=""/></div>
                    <h3 ng-bind="item.wine_cn_name">猎豹庄（臻品）嘉本纳沙威浓（红）</h3>
                    <p class="product-item-eng" ng-bind="item.wine_en_name">Leopard’s Leap Special Edition Cabernet Sauvigon</p>
                  <p class="product-item-from">{{item.country_cn_name}}<span ng-if="item.wine_year&&item.wine_year!=''&&item.wine_year!='+'&&item.wine_year!='﹢'&&item.wine_year!='NV'">，{{item.wine_year}}</span></p>
                    <p>参考价：<em class="product-item-money">¥ {{getFormatNum(item.wine_price)}}<span class="product-money-tips">仅供参考</span></em></p>
                </a>
            </li>
        </ul>
    </div>
    </div>
  </ion-content>
  <ion-footer-bar ng-show="!showCancelSignIn && !showInviteMe && !showCancelMeeting && !showShare" ng-if="meetingDetail">
    <div class="bar bar-footer">
      <div class="tabs tabs-icon-only activity-bottom-ctrl">
        <a class="tab-item" ng-show="isShareShow">
          <i class="icon card-share-icon" on-touch="showMeetingShare(meetingDetail.acitivityDetail.mm_id)"></i>
        </a>
        <a class="tab-item" on-touch="collectMeeting()">
          <i class="icon card-collect-icon" ng-class="{'active':meetingDetail.mcmeetStatus}"></i>
        </a>
        <a class="tab-item" on-touch="likeMeeting()">
          <i class="icon card-praise-icon" ng-class="{'active':meetingDetail.lmeetStatus}"></i>
        </a>
        <a ng-href="#/meetingComment/{{meetingDetail.acitivityDetail.mm_id}}" class="tab-item">
          <i class="icon card-comment-icon"><em class="meeting-ctrl-nav-num" ng-bind="meetingDetail.acitivityDetail.mm_comment_num">98</em></i>
        </a>
      </div>
      <!--我发布的约局-->
      <!--<button class="button pull-right button-small grey-bottom-btn" ng-if="meetingDetail.iReleaseStatus" ng-class="{'disabled':meetingDetail.personList.length>0||meetingDetail.outofDate}" on-touch="cancelMeeting()" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>-->
      <div class="absolute-right" style="width:125px" ng-if="meetingDetail.iReleaseStatus">
        <button class="button button-small claret-red-btn" ng-class="{'disabled':meetingDetail.personList.length>0||meetingDetail.outofDate}" type="button" ng-click="cancelMeeting()" >取消</button>
        <button class="button button-small claret-red-btn" ng-class="{'disabled':meetingDetail.personList.length>0||meetingDetail.outofDate}" type="button" ng-click="editMeeting()">编辑</button>
      </div>
      <!--邀请我的约局-->
      <div class="absolute-right" style="width:125px" ng-if="meetingDetail.inviteMeStatus && meetingDetail.mmi_state=='未处理'">
        <button class="button button-small claret-red-btn" ng-class="{'disabled':meetingDetail.outofDate}" ng-if="meetingDetail.mmi_state=='未处理'" type="button" ng-click="cancelInvite()">拒绝</button>
        <button class="button button-small claret-red-btn" ng-class="{'disabled':meetingDetail.outofDate}" ng-if="meetingDetail.mmi_state=='未处理'" type="button" ng-click="aggreeInvite()">同意</button>
      </div>
      <button class="button pull-right button-small claret-state-btn" ng-class="{'disabled':meetingDetail.outofDate}" ng-if="meetingDetail.inviteMeStatus && meetingDetail.mmi_state=='同意'" ng-click="signOutInvitedMeeting()" type="button">取消报名</button>
      <button class="button pull-right button-small claret-state-btn disabled" ng-if="meetingDetail.inviteMeStatus && meetingDetail.mmi_state=='拒绝'" type="button">已拒绝</button>
      <!--已报名或者未报名的约局-->
      <a class="button pull-right button-small" ng-if="!meetingDetail.iReleaseStatus&&!meetingDetail.inviteMeStatus"
         ng-class="{'disabled':meetingDetail.outofDate||(!meetingDetail.hasSignIn&&meetingDetail.fullPersonNum),'claret-state-btn':meetingDetail.hasSignIn,'claret-red-btn':!meetingDetail.hasSignIn&&!meetingDetail.outofDate}" ng-bind="signInBtn"  ng-click="go2SignIn()">我要报名</a>
    </div>
  </ion-footer-bar>

</ion-view>
